package com.movecar.jpush;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import cn.jpush.android.api.JPushInterface;

import com.movecar.R;

public class PushDetailActivity extends Activity {
	private String content = "";
	TextView pushMsg;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.push_detail);
		Button back = (Button) findViewById(R.id.btn_left);
		back.setVisibility(View.VISIBLE);
		back.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				finish();

			}
		});
		pushMsg = (TextView) findViewById(R.id.pushMsg);
		TextView title = (TextView) findViewById(R.id.title);
		title.setText("最新消息");
		Intent intent = getIntent();
		if (null != intent) {
			Bundle bundle = getIntent().getExtras();
			// String title = bundle
			// .getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
			content = bundle.getString(JPushInterface.EXTRA_ALERT);
			Log.d("wxl", "content=" + content);
			pushMsg.setText(content);
		}
	}

}
